package com.hxl.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hxl.config.LogAnnotation;
import com.hxl.entity.CmfzUser;
import com.hxl.service.CmfzUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * InnoDB free: 10240 kB 前端控制器
 * </p>
 *
 * @author hxl
 * @since 2020-08-18
 */
@RestController
@RequestMapping("user")
public class CmfzUserController {
    @Autowired
    private CmfzUserService cmfzUserService;
    @GetMapping("showGender")
    @LogAnnotation(content = "查看性别信息统计",type = "select")
    public List<Map> showGender(){
        return cmfzUserService.selectCountByGender();
    }
    @GetMapping("showWeeks")
    @LogAnnotation(content = "查看性别近三周注册量统计",type = "select")
    public List<Map> showWeeks(){
        return cmfzUserService.selectCountByWeeks();
    }
    @GetMapping("showMap")
    @LogAnnotation(content = "查看地域信息统计",type = "select")
    public List<Map> showMap(){
        return cmfzUserService.selectCountByMap();
    }
    @GetMapping("testThread")
    public Map testMulThread(){
        return cmfzUserService.testMulThread();
    }
}
